[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 Other Constants...DEFS, FALSE, and TRUE

 Functions

  DEFS    Parm passed to various statements for default Values
  FALSE   BOOLEAN FALSE Value
  TRUE    BOOLEAN TRUE Value

 Value
  DEFS  = 0 = 0b = 0o = 0h
  FALSE = 0 = 0b = 0o = 0h
  TRUE  = 1 = 1b = 1o = 1h

 Remarks
  DEFS   There are many statements that take special values as parameters
         or flags as an indication to do some special processing.  This
         constant is meant to be used by itself when you do not need any
         other special constant Value.

  FALSE  BOOLEAN logic is based on two values: TRUE (1) and FALSE (0).
         The literal numeric constants 0 and 1 may be used in expressions,
         or you may use the predefined named constants TRUE and FALSE.
         They make for more readable, maintainable code and have no more
         overhead than any other constant value at run time.

  TRUE   Same as FALSE above.

 Examples

  DEFS:
  STRING ans
  LET ans = NOCHAR()
  INPUTSTR "Run program now",ans,@X0E,1,"YyNn",DEFS
  IF (UPPER(ans) = NOCHAR()) END

  FALSE or TRUE:
  BOOLEAN flag
  LET flag = TRUE
  WHILE (!flag) DO
   INPUTSTR "Text",s,@X0E,60,"ABCDEFGHIJKLMNOPQRSTUVWXYZ",UPCASE
   PRINTLN s
   IF (s = "QUIT") LET flag = FALSE
  ENDWHILE

See Also: FALSE TRUE DEFS
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson